package com.dayaokeji.rhythmschoolstudent.client.home.adapter;

import android.support.annotation.Nullable;
import android.widget.ImageView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.dayaokeji.rhythmschoolstudent.R;
import com.dayaokeji.rhythmschoolstudent.client.home.data.bean.ComponentBean;

import java.util.List;

/**
 * ********************************************************************
 * *  Created by Zeno on 2018/7/5
 * ********************************************************************
 * *  version 1.0
 * ********************************************************************
 * *  Copyright (C) dayaokeji.com 2018 -- 2020 All rights reserved.
 * ********************************************************************
 * *
 * ********************************************************************
 */
public class InteractiveAdapter extends BaseQuickAdapter<ComponentBean,BaseViewHolder> {

    public InteractiveAdapter(@Nullable List<ComponentBean> data) {
        super(R.layout.item_interactive, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, ComponentBean item) {
        ImageView ivItemIc = helper.getView(R.id.iv_item_ic);
        ivItemIc.setImageResource(item.getIconResId());
        helper.setText(R.id.item_name, item.getNameStr());

    }
}
